package com.linhai.scm.struts2.base;

import org.springframework.beans.factory.annotation.Autowired;

import com.linhai.scm.entity.base.User;
import com.linhai.scm.service.IUserService;



/**
 * 测试用于测试的Action
 * @author linhai
 *
 */
public class TestAction extends BaseAction {

	private static final long serialVersionUID = 5689240920245271864L;

	@Autowired
	private IUserService service;
	
	private String name;
	private String pwd;
	
	public String execute() {
		return SUCCESS;
	}

	public String login() {
		return SUCCESS;
	}

	public String auth() {
		User user=new User();
		user.setUserName(name);
		user.setUserPwd(pwd);
		return service.auth(user)?SUCCESS:ERROR;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}
}
